import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

const app = createApp(App);
// 全局引入ElementPlus
// import ElementPlus from 'element-plus'
// import 'element-plus/lib/theme-chalk/index.css'
// app.use(ElementPlus,{size: 'small'});

// 按需引入ElementPlus
import ui from './plugins/elements.js'
// 自定义主题scss变量
import './plugins/element-variables.scss'
ui.components.forEach(component => {
    app.component(component.name, component)
})
ui.plugins.forEach(plugin => {
    app.use(plugin)
})
app.config.globalProperties.$ELEMENT = {size: "small"};

// 全局引入 Varlet
// import Varlet from '@varlet/ui'
// import '@varlet/ui/es/style'
// app.use(Varlet);

// 按需引入 Varlet
import ui2 from './plugins/varlet'
ui2.plugins.forEach(plugin => {
    app.use(plugin)
})

app.use(router).mount('#app');
